From: Sebastian Keller Date: Fri, 15 Mar 2024 10:52:37 +0000 (+0100) Subject: keyboard: Specify anchor when deleting characters via timeout X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=04fd3a4277329561fcc110e05bc3c32fd414dc61;p=gnome-shell.git keyboard: Specify anchor when deleting characters via timeout 6e80f858c dropped the second cursor argument used as anchor when calling the delete function from the timeout. This was causing the early check that was trying to detect when deleting from the beginning of the text to fail, because anchor was now undefined. Fixes: 6e80f858c ("keyboard: Move backspace key handling to KeyboardController") Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7484 Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 00f262668..73ff1d212 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -2189,7 +2189,7 @@ class KeyboardController extends Signals.EventEmitter { } this._surroundingUpdateTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, KEY_RELEASE_TIMEOUT, () => { - func(text, cursor); + func(text, cursor, cursor); this._surroundingUpdateTimeoutId = 0; return GLib.SOURCE_REMOVE; });